package com.controller;

import com.bean.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@Controller
@RequestMapping("temp")
public class TempController {

    @RequestMapping("hello")
    @ResponseBody
    public String hello(){
        return "hello spring";
    }

    @RequestMapping("user")
    @ResponseBody
    public User user(){
        return new User("韩梅梅", "6666");
    }
}
